In view of the lessons of the Mini project, many places are not standard enough and inefficient. Therefore, in the further study of PHP, combined with Internet resources on the knowledge of PHP to do a certain summary, in order to avoid
1 Code optimization1 Try to be staticIf a method can be static, it is declared static, the speed can be increased by 1/4, even when I test, this improved by nearly three times Times.of course, This test method needs to be executed at level 100,000
In-depth analysis of PHP optimization and precautions, in-depth analysis of php Optimization
1. Static as much as possible:
If a method can be static, it is declared as static, and the speed can be increased by 1/4, or even increased by nearly three
PHP Optimization for PHP optimization is mainly related to the php.ini in the main parameters of the reasonable adjustment and settings, the following we will look at some of the php.ini in the performance of a large number of parameters should be
PHP Optimization for PHP optimization is mainly related to the php.ini in the main parameters of the reasonable adjustment and settings, the following we will look at some of the php.ini in the performance of a large number of parameters should be
PHP Optimization for PHP optimization is mainly related to the php.ini in the main parameters of the reasonable adjustment and settings, the following we will look at some of the php.ini in the performance of a large number of parameters should be
0. It is quicker to use single quotes instead of double quotes to contain strings. Because PHP will search for variables in a string surrounded by double quotes, single quotes will not, note: only echo can do this, it is a string can be used as a
PHP efficient writing, php High Efficiency1. Static as much as possible:
If a method can be static, it is declared as static, and the speed can be increased by 1/4, or even increased by nearly three times during my testing.Of course, this test
Analysis of PHP efficient writing (detailed reasons ). 1. static method as much as possible: if a method can be static, it should be declared as static. The speed can be improved by 14, or even improved by nearly three times during my testing. Of
1. It is quicker to use single quotes instead of double quotes to contain strings. Because PHP will search for variables in a string surrounded by double quotes, single quotes will not, note: only echo can do this, it is a string can be used as a
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.